﻿using System;
using Evpo.ContactData.Common;
using System.Data.SqlClient;
using System.Collections.Generic;

namespace Evpo.ContactData.Data
{
    public class Address : DataObject, IAddress
    {
        #region Fields
        #endregion

        #region Properties
        internal override int PrimaryKeyValue
        {
            get { return ContactAddressID; }
            set { ContactAddressID = value; }
        }
        
        public int ContactAddressID
        {
            get;
            set;
        }

        public string Line1
        {
            get;
            set;
        }

        public string Line2
        {
            get;
            set;
        }

        public string Suburb
        {
            get;
            set;
        }

        public string State
        {
            get;
            set;
        }

        public string Postcode
        {
            get;
            set;
        }

        public string Country
        {
            get;
            set;
        }
        #endregion

        #region Methods
        internal override void FillFieldsFromReader(ProcedureOutputReader procReader)
        {
            AddressAdapter.FillFieldsFromReader(this, procReader);
        }

        internal override void FillParametersToSave(List<SqlParameter> paramList)
        {
            AddressAdapter.FillAddressParametersToSave(this, paramList);
        }
        #endregion Methods


    }
}
